<!DOCTYPE html>
<html lang="en">
	<?php
	$this -> load -> helper('form');
	if(!isset($_SESSION)){
	session_start();
	}
	?>
	<head>
		

	</head>
	<body>
<!-- Body Template -->
		
			
<!-- End of Body Template -->
<!-- InstanceBeginEditable name="content" -->
		<?php
		if (isset($_SESSION['registererror']) )
		{
		echo $registererror;
		}
		?>

		<h1>User Registration</h1>
		<p class="plsextra margin">Please Fill in the details below</p>

		<?php
		echo form_open('user/register');

		$username = array(
			'name'	=> 	'username',
			'id'	=>	'username',
			'value'	=> 	set_value('username')
		);

		$fname = array(
			'name'	=> 	'fname',
			'id'	=>	'fname',
			'value'	=> 	set_value('fname')
		);

		$lname = array(
			'name'	=> 	'lname',
			'id'	=>	'lname',
			'value'	=> 	set_value('lname')
		);

		$email = array(
			'name'	=> 	'email',
			'id'	=>	'email',
			'value'	=> 	set_value('email')
		);

		$password = array(
			'name'	=> 	'password',
			'id'	=>	'password',
			'value'	=> 	''
		);

		$password_conf = array(
			'name'	=> 	'password_conf',
			'id'	=>	'password_conf',
			'value'	=> 	''
		);


		?>
		<table >
			<tr>
				<td>
					<?php
						if(isset($registererror)){
						echo $registererror;
						}
			  		?>
				</td>
			</tr>
			<tr><td>&nbsp;</td></tr>
			<tr>
				<td>
					<label>Username</label>
					<div>
						<?php echo form_input($username); ?>
					</div>
					<span style="padding:5px; font-size: 10px; color: red;">Min. 5 characters ; alpha-numeric characters </span>

				</td>
			</tr>
			<tr><td>&nbsp;</td></tr>
			<tr>
				<td>
					<label>First Name</label>
					<div>
						<?php echo form_input($fname); ?>
					</div>
				</td>
			</tr>
			<tr><td>&nbsp;</td></tr>
			<tr>
				<td>
					<label>Last Name</label>
					<div>
						<?php echo form_input($lname); ?>
					</div>
				</td>
			</tr>
			<tr><td>&nbsp;</td></tr>
			<tr>
				<td>
					<label>Email Address</label>
					<div>
						<?php echo form_input($email); ?>
					</div>
				</td>
			</tr>
			<tr><td>&nbsp;</td></tr>
			<tr>
				<td>
					<label>Password</label>
					<div>
						<?php echo form_password($password); ?>
					</div>
					<span style="padding:5px; font-size: 10px; color: red;">Min. 6 characters </span>
				</td>
			</tr>
			<tr><td>&nbsp;</td></tr>
			<tr>
				<td>
					<label>Confirm Password</label>
					<div>
						<?php echo form_password($password_conf); ?>
					</div>
				</td>
			</tr>
			<tr><td>&nbsp;</td></tr>
			<tr>
				<td>
					<div>
						<span><button type="register" />Register</span>
					</div>
				</td>
			</tr>
			<?php
				echo form_close();
			?>
		</table>
		

<!-- Footer Template -->
<!-- InstanceEndEditable -->
		
	
<!-- -->
	</body>
</html>
